<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/home/include/init_home.jsp" %>
<%@ page import="com.qbooks.board.*" %>
<%
	String ip_addr			= request.getRemoteAddr();
	String word_id			= StringUtil.nvl(request.getParameter("word_id"));
	String search_col		= StringUtil.nvl(request.getParameter("search_col"), "subject");
	String search_word		= StringUtil.toHan(StringUtil.nvl(request.getParameter("search_word")));
	String curr_page 		= StringUtil.nvl(request.getParameter("curr_page"), "1");
	
	HashMap param = new HashMap();
	param.put("word_id",	word_id);
	
	
	BoardDAO boardDAO 		= new BoardDAO();
	HashList wordInfo		= boardDAO.selectWordInfo(param);
	HashList commentList	= null;
	
	
	String board_id			= wordInfo.get("board_id",0);
	
	if (!ip_addr.equals(wordInfo.get("ip_addr",0))) {
		param.put("job_type", "UC");
		boardDAO.saveWord(param);
	}
	
	
	//쓰기권한
	boolean bWritable		= false;

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
	<title><%= HOME_NAME %></title>
	<%@ include file="/home/include/cssnjs.jsp"  %>
	<script type="text/javascript">
	$(document).ready(function() {


	});
	
	</script>
</head>
<body>
	<div id="wrap">
		<%@ include file="/home/include/header.jsp"  %>
		
		<div id="contents">
			<h2><%= wordInfo.get("subject",0) %></h2>
			<div id="word">
            	<p id="init_date">
            		<%= wordInfo.get("init_date",0) %> 조회 <%= wordInfo.get("count", 0) %>
            	</p>
				<div class="mt40">
					<%		if ("Y".equals(wordInfo.get("html_yn",0))) { %>
					<%= wordInfo.get("content",0) %>
		<%		} else { %>
					<%= StringUtil.toHTML(wordInfo.get("content",0)) %>
		<%		} %>
				</div>
			</div>
			
			<div class="buttons">
				<form method="get" action="./notice.jsp">
				<button class="btn" title="목록">목록</button>
				</form>
			</div>
             
		</div>
		<%@ include file="/home/include/footer.jsp"  %>	
	</div>

</body>
</html>









